﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Net;
using System.Security.Principal;
namespace WebServer
{
    /// <summary>
    /// An inplementation of the IHttpRequesthandler
    /// </summary>
    public class BaseRequestHandler : IHttpRequestHandler
    {
        /// <summary>
        /// Handles a GET request
        /// </summary>
        /// <param name="request">The request object</param>
        /// <param name="response">The response object</param>
        /// <param name="user">The detected users identity</param>
        public virtual void Get(HttpListenerRequest request, HttpListenerResponse response, IPrincipal user)
        { Get(request, response); }

        /// <summary>
        /// Handles a POST request
        /// </summary>
        /// <param name="request">The request object</param>
        /// <param name="response">The response object</param>
        /// <param name="user">The detected users identity</param>
        public virtual void Post(HttpListenerRequest request, HttpListenerResponse response, IPrincipal user)
        { Post(request, response); }

        /// <summary>
        /// Handles a PUT request
        /// </summary>
        /// <param name="request">The request object</param>
        /// <param name="response">The response object</param>
        /// <param name="user">The detected users identity</param>
        public virtual void Put(HttpListenerRequest request, HttpListenerResponse response, IPrincipal user)
        { Put(request, response); }

        /// <summary>
        /// Handles a DELETE request
        /// </summary>
        /// <param name="request">The request object</param>
        /// <param name="response">The response object</param>
        /// <param name="user">The detected users identity</param>
        public virtual void Delete(HttpListenerRequest request, HttpListenerResponse response, IPrincipal user)
        { Delete(request, response); }

        /// <summary>
        /// Handles a GET request
        /// </summary>
        /// <param name="request">The request object</param>
        /// <param name="response">The response object</param>
        [System.Diagnostics.CodeAnalysis.SuppressMessage("Microsoft.Naming", "CA1716:IdentifiersShouldNotMatchKeywords", MessageId = "Get")]
        public virtual void Get(HttpListenerRequest request, HttpListenerResponse response)
        { throw new NotImplementedException(); }

        /// <summary>
        /// Handles a POST request
        /// </summary>
        /// <param name="request">The request object</param>
        /// <param name="response">The response object</param>
        public virtual void Post(HttpListenerRequest request, HttpListenerResponse response)
        { throw new NotImplementedException(); }

        /// <summary>
        /// Handles a PUT request
        /// </summary>
        /// <param name="request">The request object</param>
        /// <param name="response">The response object</param>
        public virtual void Put(HttpListenerRequest request, HttpListenerResponse response)
        { throw new NotImplementedException(); }

        /// <summary>
        /// Handles a DELETE request
        /// </summary>
        /// <param name="request">The request object</param>
        /// <param name="response">The response object</param>
        public virtual void Delete(HttpListenerRequest request, HttpListenerResponse response)
        { throw new NotImplementedException(); }
    }
}
